﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ARS.Control.Custom.Entity.Fields;

namespace ARS.Fields
{

    public class MyUser : ARS.Control.Custom.Entity.Model.EntityModel
    {
        //private class Meta : ARS.Control.Custom.Entity.Interface.IEntityMeta
        //{

        //    //public ForeignKeyConfig GetForeignKeyConfig()
        //    //{

        //    //}
        //    public override ForeignKeyConfig GetForeignKeyConfig()
        //    {
        //        ForeignKeyConfig config = new ForeignKeyConfig();
        //        config.TableName = "Users";
        //        config.KeyField = "Users_Id";
        //        config.DataTextField = "RealName";
        //        return config;
        //    }
        //}

        //public MyUser()
        //{
        //    base.Meta = new Meta();
        //}
    }

    public class Users_Permissions
    {
        [KeyField()]
        public int Users_Permissions_Id
        {
            get;
            set;
        }

        //[ChoicesDialogConfig(TableName = "Users", DataValueField = "Users_Id", DataTextField = "RealName")]
        [ChoicesDialogField(Verbose_Name = "名称", ListUrl = "dp.aspx", MaxChoicesNum = 4, IsEncryptKey = true, DataTextClassName = "name1", IsShow = true)]
        public string Name
        {
            get;
            set;
        }
        [ChoicesField(Verbose_Name = "编码", Choices = "0|Add,1|Delete", IsShow = true)]
        public string Code
        {
            get;
            set;
        }
        [BooleanField(Verbose_Name = "1", SelectValue = "1", DefaultValue = "1")]
        public string Remark
        {
            get;
            set;
        }
        //[ForeignKeyField(Verbose_Name="名称",IsShow=true)]
        //public MyUser Name
        //{
        //    get;
        //    set;
        //}

        
        //[ChoicesDialogField(Verbose_Name = "代码", ListUrl = "dp.aspx", MaxChoicesNum = 3, DataTextIndex = 0, DataValueIndex = -1)]
        //public string Code
        //{
        //    get;
        //    set;
        //}

        //[ChoicesDialogField(Verbose_Name = "用户", ListUrl = "dp.aspx", MaxChoicesNum = 2, DataTextIndex = 0, DataValueIndex = -1)]
        //public int ParentId
        //{
        //    get;
        //    set;
        //}
    }
}
